/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author hafiz anshori
 */
@Entity
@Table(name = "pembayaran", catalog = "sirere", schema = "")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Pembayaran.findAll", query = "SELECT p FROM Pembayaran p"),
    @NamedQuery(name = "Pembayaran.findByIdBayar", query = "SELECT p FROM Pembayaran p WHERE p.idBayar = :idBayar"),
    @NamedQuery(name = "Pembayaran.findByIdUser", query = "SELECT p FROM Pembayaran p WHERE p.idUser = :idUser"),
    @NamedQuery(name = "Pembayaran.findByAtasNama", query = "SELECT p FROM Pembayaran p WHERE p.atasNama = :atasNama"),
    @NamedQuery(name = "Pembayaran.findByNoKartu", query = "SELECT p FROM Pembayaran p WHERE p.noKartu = :noKartu"),
    @NamedQuery(name = "Pembayaran.findByBank", query = "SELECT p FROM Pembayaran p WHERE p.bank = :bank"),
    @NamedQuery(name = "Pembayaran.findByPembayaran", query = "SELECT p FROM Pembayaran p WHERE p.pembayaran = :pembayaran"),
    @NamedQuery(name = "Pembayaran.findByTotalBiaya", query = "SELECT p FROM Pembayaran p WHERE p.totalBiaya = :totalBiaya")})
public class Pembayaran implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "id_bayar", nullable = false)
    private Integer idBayar;
    @Basic(optional = false)
    @Column(name = "id_user", nullable = false)
    private int idUser;
    @Basic(optional = false)
    @Column(name = "atas_nama", nullable = false, length = 30)
    private String atasNama;
    @Basic(optional = false)
    @Column(name = "no_kartu", nullable = false, length = 16)
    private String noKartu;
    @Basic(optional = false)
    @Column(name = "bank", nullable = false)
    private int bank;
    @Basic(optional = false)
    @Column(name = "pembayaran", nullable = false)
    private int pembayaran;
    @Basic(optional = false)
    @Column(name = "total biaya", nullable = false, length = 8)
    private String totalBiaya;

    public Pembayaran() {
    }

    public Pembayaran(Integer idBayar) {
        this.idBayar = idBayar;
    }

    public Pembayaran(Integer idBayar, int idUser, String atasNama, String noKartu, int bank, int pembayaran, String totalBiaya) {
        this.idBayar = idBayar;
        this.idUser = idUser;
        this.atasNama = atasNama;
        this.noKartu = noKartu;
        this.bank = bank;
        this.pembayaran = pembayaran;
        this.totalBiaya = totalBiaya;
    }

    public Integer getIdBayar() {
        return idBayar;
    }

    public void setIdBayar(Integer idBayar) {
        this.idBayar = idBayar;
    }

    public int getIdUser() {
        return idUser;
    }

    public void setIdUser(int idUser) {
        this.idUser = idUser;
    }

    public String getAtasNama() {
        return atasNama;
    }

    public void setAtasNama(String atasNama) {
        this.atasNama = atasNama;
    }

    public String getNoKartu() {
        return noKartu;
    }

    public void setNoKartu(String noKartu) {
        this.noKartu = noKartu;
    }

    public int getBank() {
        return bank;
    }

    public void setBank(int bank) {
        this.bank = bank;
    }

    public int getPembayaran() {
        return pembayaran;
    }

    public void setPembayaran(int pembayaran) {
        this.pembayaran = pembayaran;
    }

    public String getTotalBiaya() {
        return totalBiaya;
    }

    public void setTotalBiaya(String totalBiaya) {
        this.totalBiaya = totalBiaya;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idBayar != null ? idBayar.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Pembayaran)) {
            return false;
        }
        Pembayaran other = (Pembayaran) object;
        if ((this.idBayar == null && other.idBayar != null) || (this.idBayar != null && !this.idBayar.equals(other.idBayar))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entity.Pembayaran[ idBayar=" + idBayar + " ]";
    }
    
}
